#! /bin/sh
# Run cwell with CWP X Graphics

demo=8
MACHINE=keller
USER="-l jkc"  # not needed if same username on both machines

# If NEXTFILE1, etc. is empty (eg. comment off), display with image on NeXT
NEXTFILE1="~jkc/Images/CWELL/demo${demo}graph.eps"
NEXTFILE2="~jkc/Images/CWELL/demo${demo}wig.eps"

if [ -z "$NEXTFILE1" ]
then
	remoteCommand1="images"
else
	remoteCommand1="cat >$NEXTFILE1"
fi

if [ -z "$NEXTFILE2" ]
then
	remoteCommand2="images"
else
	remoteCommand2="cat >$NEXTFILE2"
fi


x1beg=0 x1end=6500 x2beg=-100 x2end=10000

cwell |
cshotplot >demo${demo}plot  outpar=demo${demo}par

psgraph <demo${demo}plot par=demo${demo}par style=seismic \
	wbox=3.8 hbox=2 \
	x1beg=$x1beg x1end=$x1end x2beg=$x2beg x2end=$x2end |
rsh $MACHINE -l jkc $remoteCommand1

cshot2

suaddhead <demo${demo}traces ftn=1 ns=501 |
sushw key=dt a=4000 |
sugain gagc=1 wagc=0.5 |
suaddnoise sn=5000 |		# to help pswigp
supswigp title= \
	title="Direct+Primaries (AGC)" \
	label1="Time in Seconds"  label2="Trace" |
rsh $MACHINE -l jkc $remoteCommand2
